import java.util.*;    

public class Cart {
	private HashSet<Integer> GoodList;
	private HashMap<Integer, Integer> GL;
	
	public Cart(){
		GoodList=new HashSet<Integer>();
		GL=new HashMap<Integer, Integer>();
	}
	
	public String GetGoodList(){
		System.out.println( GoodList.toString());
		System.out.println( GL.toString());
		return GL.toString();

	}
	public void  Add(int id){
		GoodList.add(id);
		Add(id,1);
	}
	public void Add(int id,int num){
		if(GL.get(id)!=null){
			num=num+GL.get(id);		//加上旧值
		}
		GL.put(id, num);
	}
	
	
	public void Delete(int ID){
		GoodList.remove(ID);
		GL.remove(ID);
	}
	public void BuyAll(){
		
	}
}
